/*
与后台交互模块 （依赖已封装的ajax函数）
 */
console.log("process.env.NODE_ENV", process.env.NODE_ENV)

import ajax from './ajax';
let BASE_URL, LIHUA_URL;
if (process.env.NODE_ENV === 'development') {
  BASE_URL = '/api';
  LIHUA_URL = '/lihua';
} else {
  BASE_URL = '/public/api/zs';
  LIHUA_URL = '/public/api';
}



/** 新版数据20181205  **/
// screen
// 获取项目总体信息
export const reqScreenInit = (data) => ajax(`${BASE_URL}/project/getAll`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取单个项目的详细信息
export const reqScreenInfo = (data) => ajax(`${BASE_URL}/project/getInfo`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取总体项目的户数信息
export const reqScreenFamily = (data) => ajax(`${BASE_URL}/project/countfamilys`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取总体项目房屋类型
export const reqScreenHouse = (data) => ajax(`${BASE_URL}/project/getHouse`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取项目总体资金状况
export const reqScreenMoney = (data) => ajax(`${BASE_URL}/project/getMoney`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取全部项目的进度状况
export const reqScreenSchedule = (data) => ajax(`${BASE_URL}/project/schedule`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取总体补偿方式
export const reqScreenCompensation = (data) => ajax(`${BASE_URL}/project/compensation`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取项目劳务排名
export const reqScreenLaowuRank = (data) => ajax(`${BASE_URL}/project/laowuRank`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 征收房屋面积信息
export const reqScreenArea = (data) => ajax(`${BASE_URL}/project/getArea`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 第三方机构信息
export const reqScreenThirdCom = (data) => ajax(`${BASE_URL}/project/thirdCom`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 每月支出情况
export const reqScreenMonthPay = (data) => ajax(`${BASE_URL}/project/monthPay`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// project
// 获取单个项目信息
export const reqProjectInit = (data) => ajax(`${BASE_URL}/project/getProject`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取项目节点信息
export const reqSignStatus = (data) => ajax(`${BASE_URL}/project/getLog`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 补偿均价
export const reqAvgPrice = (data) => ajax(`${BASE_URL}/project/avgPrice`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 资金分类
export const reqMoneyType = (data) => ajax(`${BASE_URL}/project/moneyType`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 资金进度(按月)
export const reqMoneySpeed = (data) => ajax(`${BASE_URL}/project/getMoneySpeed`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 资金进度(按日)
export const reqMoneySpeedDay = (data) => ajax(`${BASE_URL}/project/getMoneyDay`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 项目签约进度(按月)
export const reqSignSpeed = (data) => ajax(`${BASE_URL}/project/getSignSpeed`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 项目签约进度(按日)
export const reqSignSpeedDay = (data) => ajax(`${BASE_URL}/project/getSignDay`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 项目拆迁户搜索
export const reqSearchFamily = (data) => ajax(`${BASE_URL}/project/getProjectSerach`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })

// 移动端链接
// 页面初始化数据
export const reqProjectHome = (data) => ajax(`${BASE_URL}/project/getDataCountByTime`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取项目列表
export const reqProjectList = (data) => ajax(`${BASE_URL}/project/getProjectList`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 关注项目
export const reqProjectFllow = (data) => ajax(`${BASE_URL}/project/follow`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 取消关注项目
export const reqProjectUnFllow = (data) => ajax(`${BASE_URL}/project/cancelfollow`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 账号密码登录
export const reqPwdLogin = (data) => ajax(`${LIHUA_URL}/auth/login`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取收藏列表
export const reqFollowList = (data) => ajax(`${BASE_URL}/project/getFollowList`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取体项目签约户数明细
export const reqSignList = (data) => ajax(`${BASE_URL}/project/getSignList`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取总体项目到账资金明细
export const reqGetMongyList = (data) => ajax(`${BASE_URL}/project/getTotalList`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
// 获取总体项目支出资金明细
export const reqPayMongyList = (data) => ajax(`${BASE_URL}/project/getPayList`, data, 'POST', { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' })
